<template>
	<view :style="themeColor">
		<view class="page">
			<view
				class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex logOutSubmit_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-stretch justify-between logOutSubmit_fd0_0'>
					<view class='flex flex-wrap align-center logOutSubmit_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  logOutSubmit_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='logOutSubmit_fd0_0_c1_c0'>{{$t('注销账号')}}</text>
					</view>
					<view class='flex align-center justify-end logOutSubmit_fd0_0_c2'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#3090FF"></u-loading>
				<view>加载中</view>
			</view>
			<block v-else>
				<view class="flex flex-direction flex-wrap align-center benben-flex-layout logOutSubmit_flex_1" v-if="type == 1">
					<image class='logOutSubmit_fd1_0' mode="aspectFit" :src='STATIC_URL+"225.png"'></image>
					<text class='logOutSubmit_fd1_1'>注销申请提交成功！</text>
					<text class='logOutSubmit_fd1_2'>我们工作人员将会对您的账号进行审核，审核通过后， 账号将会被注销，请知悉。</text>
					<button class='logOutSubmit_fd1_3' @tap.stop="logOutFunc">退出登录</button>
				</view>
				<block v-if="type != 1">
					<view class="flex flex-direction flex-wrap align-center benben-flex-layout logOutSubmit_flex_1" v-if="datadataMessage.status == 1">
						<image class='logOutSubmit_fd1_0' mode="aspectFit" :src='STATIC_URL+"226.png"'></image>
						<text class='logOutSubmit_fd1_1'>注销正在审核中！</text>
						<text class='logOutSubmit_fd1_2'>{{datadataMessage.cancel_type}}</text>
						<button class='logOutSubmit_fd1_3' @tap.stop="logOutFunc">退出登录</button>
					</view>
					<view class="flex flex-direction flex-wrap align-center benben-flex-layout logOutSubmit_flex_1" v-if="datadataMessage.status == 3">
						<image class='logOutSubmit_fd1_0' mode="aspectFit" :src='STATIC_URL+"227.png"'></image>
						<text class='logOutSubmit_fd1_1'>注销审核失败！</text>
						<text class='logOutSubmit_fd1_2_x'>{{datadataMessage.refuse_reason}}</text>
						<button class='logOutSubmit_fd1_3' @tap.stop="again">重新申请</button>
						
					</view>
				</block>
				
			</block>

			

		</view>
	</view>
</template>
<script>
	export default {
		components: {},


		data() {
			return {
				"type": "1",  // 1第一次提交  2已经提交过
				"datadataMessage": {
					"status": "1",  // 注销状态：-1.未申请；1.待审核；2.已同意；3.已拒绝
				},
				"isShow": true,
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				type,
				status
			} = options
			if (type !== undefined) this.type = type
			if (status !== undefined) this.status = status
			this.getMessageFunc();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			async getMessageFunc() {
				//请求方法
				//数据验证
			
				let datadataMessage = await this.$api.post(global.apiUrls.post656f152f10a6f, {
					
				});
				this.isShow = false;
				if (datadataMessage.data.code != 1) {
					this.$message.info(datadataMessage.data.msg);
					return
				}
				let infodataMessage = datadataMessage.data;
				this.datadataMessage = infodataMessage.data;
			},
			//退出登录
			logOutFunc() {
				this.$store.commit('logout');
				this.$urouter.reLaunch(`/pages/tabBar/login/login`);
			},
			again() {
				uni.redirectTo({
					url:'/pages/xtsz/logOutReason/logOutReason'
				})
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;
	}

	.logOutSubmit_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.logOutSubmit_fd0_0_c2 {
		padding: 0rpx 0rpx 0rpx 0rpx;
		width: 100rpx;
	}

	.logOutSubmit_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
		line-height: 50rpx;
	}

	.logOutSubmit_fd0_0_c0_c0 {
		font-size: 36rpx;
		font-weight: 400;
		color: #333;
	}

	.logOutSubmit_fd0_0_c0 {
		width: 100rpx;
	}

	.logOutSubmit_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.logOutSubmit_flex_1 {
		padding: 88rpx 39rpx 0rpx 39rpx;
	}

	.logOutSubmit_fd1_3 {
		background: var(--benbenbgColor0);
		font-size: 32rpx;
		color: var(--benbenFontColor3);
		width: 686rpx;
		height: 88rpx;
		line-height: 88rpx;
		margin: 104rpx 0rpx 0rpx 0rpx;
		border-radius: 8rpx;
		position: fixed;
		bottom: calc(48rpx + var(--window-bottom));
	}

	.logOutSubmit_fd1_2 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #666666;
		text-align: center;
	}
	.logOutSubmit_fd1_2_x {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(255, 69, 56, 1);
		text-align: center;
	}

	.logOutSubmit_fd1_1 {
		font-size: 32rpx;
		font-weight: 700;
		color: #000000;
		margin: 32rpx 0rpx 24rpx 0rpx;
	}

	.logOutSubmit_fd1_0 {
		width: 232rpx;
		height: 232rpx;
		margin: 0rpx 0rpx 10rpx 0rpx;
	}
</style>